//
//  MovieDetailViewController.h
//  Kokozu
//
//  Created by Bismarrck on 11-7-12.
//  Copyright 2011年 Tsinghua University. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MovieRecord.h"
#import "DetailTableViewCell.h"
#import "LocationViewController.h"
#import "UserDefault.h"
#import "UIViewController+BarItem.h"

typedef enum {

    PICKER_NUM,
    PICKER_TIME,
    SLIDER_PRICE

} ActionSheetType;

@interface MovieDetailViewController : UIViewController 
    <UIScrollViewDelegate, UIPickerViewDelegate, UIPickerViewDataSource, 
     UIActionSheetDelegate>
{
    UIScrollView *scrollView_;
    UIPickerView *dataPicker_;
    UIDatePicker *datePicker_;
    UIButton *goButton_;
    UITableView *optionTable;
    UIActionSheet *actionSheet_;
    UILabel *priceLabel;
    MovieRecord *movieRecord_;
    ActionSheetType picker_type_;
}

@property (nonatomic, retain) IBOutlet UIScrollView *scrollView;
@property (nonatomic, retain) IBOutlet DetailTableViewCell *customCell;
@property (nonatomic, retain) UINib *cellNib;
@property (nonatomic, retain) UIPickerView *dataPicker;
@property (nonatomic, retain) UIDatePicker *datePicker;
@property (nonatomic, retain) IBOutlet UIButton *goButton;
@property (nonatomic, retain) IBOutlet UITableView *optionTable;
@property (nonatomic, retain) UIActionSheet *actionSheet;
@property (nonatomic, retain) UILabel *priceLabel;
@property (nonatomic, retain) MovieRecord *movieRecord;
@property (nonatomic, retain) NSDate *selectedDate;
@property (nonatomic, assign) NSInteger wantTicketsNum;

- (id)initWithMovieRecord:(MovieRecord *)aRecord;
- (IBAction)goButtonPressed;
- (void)configureCell:(DetailTableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath;
- (UIActionSheet *)actionSheetWithType:(ActionSheetType)aType;

- (NSString *)priceLabelwithPrice:(int)price;
- (void)selectionDone;
- (void)selectionCancel;
- (void)eventForDatePicker:(id)sender;
- (void)makePhoneCallWithTel:(NSString *)telNumber;

@end
